From: Giovanni Campagna Date: Sun, 6 Oct 2013 21:32:51 +0000 (+0200) Subject: BoxPointer: account for border width when requesting size X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3274 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e426f8ac473d31792e64eb7d4f7f9343a787d898;p=gnome-shell.git BoxPointer: account for border width when requesting size We must reduce the forWidth in the call to get_preferred_height() with the border width, otherwise we might request a smaller height that we actually need and overflow. https://bugzilla.gnome.org/show_bug.cgi?id=696564 --- diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js index 80dd11de9..c8a15d3f9 100644 --- a/js/ui/boxpointer.js +++ b/js/ui/boxpointer.js @@ -185,7 +185,9 @@ const BoxPointer = new Lang.Class({ }, _getPreferredHeight: function(actor, forWidth, alloc) { - let [minSize, naturalSize] = this.bin.get_preferred_height(forWidth); + let themeNode = this.actor.get_theme_node(); + let borderWidth = themeNode.get_length('-arrow-border-width'); + let [minSize, naturalSize] = this.bin.get_preferred_height(forWidth - 2 * borderWidth); alloc.min_size = minSize; alloc.natural_size = naturalSize; this._adjustAllocationForArrow(false, alloc);